/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package business;

import model.Employee;
import model.EmployeeManager;

/**
 *
 * @author Administrator
 */
public class DelEmpCmd extends AbstractCommand {

    @Override
    public boolean execute(Object args) {
        Employee employee = EmployeeManager.getInstance().getEmployeeById(getId());
        if (employee == null) {
            return false;
        }
        EmployeeManager.getInstance().delEmployee(employee);
        return true;

    }
    private String id;

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }
}
